home *** CD-ROM | disk | FTP | other *** search
/ Amiga Format CD 43 / Amiga Format CD43 (1999)(Future Publishing)(GB)(Track 1 of 2)[!][issue 1999-09].iso / -serious- / programming / c / pmm / doku / libsdoku / reqtools.library.doc < prev    next >
Text File  |  1999-06-14  |  87KB  |  1,886 lines

  1. TABLE OF CONTENTS
  2.  
  3. reqtools.library/rtAllocRequestA
  4. reqtools.library/rtChangeReqAttrA
  5. reqtools.library/rtCloseWindowSafely
  6. reqtools.library/rtEZRequestA
  7. reqtools.library/rtFileRequestA
  8. reqtools.library/rtFontRequestA
  9. reqtools.library/rtFreeFileList
  10. reqtools.library/rtFreeReqBuffer
  11. reqtools.library/rtFreeRequest
  12. reqtools.library/rtGetLongA
  13. reqtools.library/rtGetStringA
  14. reqtools.library/rtGetVScreenSize
  15. reqtools.library/rtLockWindow
  16. reqtools.library/rtPaletteRequestA
  17. reqtools.library/rtReqHandlerA
  18. reqtools.library/rtScreenModeRequestA
  19. reqtools.library/rtScreenToFrontSafely
  20. reqtools.library/rtSetReqPosition
  21. reqtools.library/rtSetWaitPointer
  22. reqtools.library/rtSpread
  23. reqtools.library/rtUnlockWindow
  24.  
  25. reqtools.library/rtAllocRequestA             reqtools.library/rtAllocRequestA
  26.  
  27.   NAME  rtAllocRequestA()
  28.  
  29.     req = rtAllocRequestA (type, taglist);
  30.  
  31.     APTR rtAllocRequestA (ULONG, struct TagItem *);
  32.     D0                    D0     A0
  33.  
  34.     req = rtAllocRequest (type, tag1,...);
  35.  
  36.     APTR rtAllocRequest (ULONG, Tag,...);
  37.  
  38.   DESCRIPTION
  39.     Allocates a requester structure for you in a future compatible manner.
  40.     This is the only way to properly allocate a rtFileRequester,
  41.     rtFontRequester, rtReqInfo or rtScreenModeRequester structure.  The
  42.     structure will be initialized for you.
  43.  
  44.     Use rtFreeRequest() to free the requester structure when you no longer
  45.     need it.
  46.  
  47.   INPUTS
  48.     type    - type of structure to allocate, currently RT_REQINFO,
  49.               RT_FILEREQ, RT_FONTREQ or RT_SCREENMODEREQ.
  50.     taglist - pointer to array of tags (currently always NULL).
  51.  
  52.   TAGS
  53.     no tags defined yet
  54.  
  55.   RESULT
  56.     req - pointer to the requester allocated or NULL if no memory.
  57.  
  58.   BUGS
  59.     none known
  60.  
  61.   SEE ALSO
  62.     rtFreeRequest()
  63.  
  64. reqtools.library/rtChangeReqAttrA           reqtools.library/rtChangeReqAttrA
  65.  
  66.   NAME  rtChangeReqAttrA()
  67.  
  68.     [long =] rtChangeReqAttrA (req, taglist);
  69.  
  70.     [LONG] rtChangeReqAttrA (APTR, struct TagItem *);
  71.                       A1    A0
  72.  
  73.     [long =] rtChangeReqAttr (req, tag1,...);
  74.  
  75.     [LONG] rtChangeReqAttr (APTR, Tag,...);
  76.  
  77.   DESCRIPTION
  78.     Change requester attributes with supplied taglist.  This is the only
  79.     correct way to change the attributes listed below.
  80.  
  81.     The return code from rtChangeReqAttrA() should be ignored unless stated
  82.     otherwise.
  83.  
  84.     Don't pass the tags listed below to the requester itself (unless
  85.     documented otherwise).  They will not be recognized.
  86.  
  87.   INPUTS
  88.     req     - pointer to requester.
  89.     taglist - pointer to array of tags.
  90.  
  91.   TAGS
  92.     for the file requester:
  93.         RTFI_Dir         - (char *)
  94.                            Name of new directory to position file requester
  95.                            in. The requester's buffer will be deallocated.
  96.         RTFI_MatchPat    - (char *)
  97.                            New pattern string to match files on.
  98.         RTFI_AddEntry    - (BPTR)
  99.                            THIS *MUST* BE THE LAST TAG (just before TAG_END)!
  100.                            Tagdata must hold a lock on a file or directory
  101.                            you want to add to the file requester's buffer.
  102.                            The lock should have been obtained using Lock(),
  103.                            and you must unlock this lock yourself.
  104.                            It is your responsibility to make sure the file
  105.                            or directory is indeed in the directory the file
  106.                            requester is in.
  107.                            If the entry is already in the file requester's
  108.                            buffer it will simply be updated.
  109.                            It is harmless to use this tag if the requester's
  110.                            buffer is not initialized. rtChangeReqAttr() will
  111.                            return a boolean to indicate success or failure
  112.                            (out of memory).
  113.         RTFI_RemoveEntry - (char *)
  114.                            Name of file or directory you want to remove from
  115.                            the file requester's buffer.
  116.                            It is your responsibility to make sure the file
  117.                            or directory is indeed in the directory the file
  118.                            requester is in.
  119.                            It is harmless use this tag if the requester's
  120.                            buffer is not initialized.
  121.     for the font requester:
  122.         RTFO_FontName    - (char *) 
  123.                            Set the name of the currently selected font.
  124.         RTFO_FontHeight  - (UWORD)
  125.                            Set the fontsize of the currently selected font.
  126.         RTFO_FontStyle   - (UBYTE)
  127.                            Set the style of the current font.
  128.         RTFO_FontFlags   - (UBYTE)
  129.                            Set the flags of the current font.
  130.     for the screenmode requester [V38]:
  131.         RTSC_ModeFromScreen - (struct Screen *)
  132.                               Screen to get mode attributes from.
  133.                               NOTE: You must make sure the mode this screen
  134.                                     is in will be accepted by the screen
  135.                                     mode requester.  Otherwise it will auto-
  136.                                     matically cancel.  For example, you use
  137.                                     RTDI_ModeFromScreen on a HAM screen and
  138.                                     you haven't set the SCREQF_NONSTDMODES
  139.                                     flag.
  140.         RTSC_DisplayID      - (ULONG)
  141.                               Set 32-bit mode id of selected mode.  The width
  142.                               and height will be set to the default (visible)
  143.                               width and height, and the depth will be set to
  144.                               maximum.  Also read note above.  Note that you
  145.                               must use this tag _before_ the three tags below
  146.                               because this tag will set the width, height and
  147.                               depth to default values.
  148.         RTSC_DisplayWidth   - (UWORD)
  149.                               Set width of display.  Must come after
  150.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  151.         RTSC_DisplayHeight  - (UWORD)
  152.                               Set height of display.  Must come after
  153.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  154.         RTSC_DisplayDepth   - (UWORD)
  155.                               Set depth of display.  Must come after
  156.                               RTSC_DisplayID or RTSC_ModeFromScreen tags.
  157.         RTSC_OverscanType   - (ULONG)
  158.                               Set type of overscan.  Set to 0 for regular
  159.                               size, otherwise use OSCAN_... constants.
  160.                               See 'intuition/screens.[h|i]'.
  161.         RTSC_AutoScroll     - (BOOL)
  162.                               Boolean state of autoscroll checkbox.
  163.  
  164.   RESULT
  165.     none (except when RTFI_AddEntry tag is used, see above)
  166.  
  167.   BUGS
  168.     none known
  169.  
  170.   SEE ALSO
  171.     dos.library/Lock()
  172.  
  173. reqtools.library/rtCloseWindowSafely     reqtools.library/rtCloseWindowSafely
  174.  
  175.   NAME  rtCloseWindowSafely() [V38]
  176.  
  177.     rtCloseWindowSafely (window);
  178.  
  179.     void rtCloseWindowSafely (struct Window *);
  180.                               A0
  181.  
  182.   DESCRIPTION
  183.     Closes a window which shares its IDCMP port with another window.  All the
  184.     pending messages (concerning this window) on the port will be removed and
  185.     the window will be closed.
  186.  
  187.     Do not use this function to close windows which have an IDCMP port set up
  188.     by Intuition.  If you do the port will be left in memory!
  189.  
  190.     If you intend to open a lot of windows all sharing the same IDCMP port it
  191.     is easiest if you create a port yourself and open all windows with
  192.     newwin.IDCMPFlags set to 0 (this tells Intuition to NOT set up an IDCMP
  193.     port).  After opening the window set the win->UserPort to your message
  194.     port and call ModifyIDCMP to set your IDCMP flags.
  195.  
  196.     When you then receive messages from intuition check the imsg->IDCMPWindow
  197.     field to find out what window they came from and act upon them.
  198.  
  199.     When closing your windows call rtCloseWindowSafely() for all of them and
  200.     delete your message port.  Easy peasy :-)
  201.  
  202.     NOTE: Only call rtCloseWindowSafely() for windows with a shared IDCMP
  203.           port.  Do *NOT* call it for windows with an IDCMP port created
  204.           by Intuition!
  205.  
  206.   INPUTS
  207.     window - pointer to the window to be closed.
  208.  
  209.   RESULT
  210.     none
  211.  
  212.   NOTE
  213.     This function is for the advanced ReqTools user.
  214.  
  215.   BUGS
  216.     none known
  217.  
  218.   SEE ALSO
  219.     intuition.library/CloseWindow()
  220.  
  221. reqtools.library/rtEZRequestA                   reqtools.library/rtEZRequestA
  222.  
  223.   NAME  rtEZRequestA()
  224.  
  225.     ret = rtEZRequestA (bodyfmt, gadfmt, reqinfo, argarray, taglist);
  226.  
  227.     ULONG rtEZRequestA
  228.                 (char *, char *, struct rtReqInfo *, APTR, struct TagItem *);
  229.     D0           A1      A2      A3                  A4    A0
  230.  
  231.     ret = rtEZRequest (bodyfmt, gadfmt, reqinfo, taglist, arg1, arg2,...);
  232.  
  233.     ULONG rtEZRequest
  234.                   (char *, char *, struct rtReqInfo *, struct TagItem *,...);
  235.  
  236.     ret = rtEZRequestTags(bodyfmt, gadfmt, reqinfo, argarray, tag1,...);
  237.  
  238.     ULONG rtEZRequestTags(char *, char *, struct rtReqInfo *, APTR, Tag,...);
  239.  
  240.   DESCRIPTION
  241.     This function puts up a requester for you and waits for a response from
  242.     the user. If the response is positive, this procedure returns TRUE.
  243.     If the response is negative, this procedure returns FALSE.
  244.     The function may also return an IDCMP flag or a value corresponding with
  245.     one of other possible responses (see below).
  246.  
  247.     'gadfmt' may contain several possible responses.  Separate these
  248.     responses by a '|'.  For example: "Yes|No", or 'Yes|Maybe|No".  The
  249.     responses should be typed in the same order as they will appear on
  250.     screen, from left to right.  There is no limit to the number of responses
  251.     other than the width of the screen the requester will appear on.
  252.  
  253.     'bodyfmt' can contain newlines ('\n', ASCII 10). This will cause a new
  254.     line to be started (surprise, surprise :-).
  255.     You may also include 'printf' style formatting codes. The format
  256.     arguments should be pointed to by 'argarray'.
  257.     You can use formatting codes in 'gadfmt' as well.  The arguments for
  258.     this format string should follow the ones for 'bodyfmt'.
  259.  
  260.     NOTE: The formatting is done by exec.library/RawDoFmt(), so be aware that
  261.           to display a 32-bit integer argument you must use "%ld", not "%d",
  262.           since RawDoFmt() is "word-oriented."
  263.  
  264.     The second and third function use a variable number of arguments. These
  265.     functions can be found in 'reqtools[nb].lib'.
  266.     The second function has the RawDoFmt arguments as variable args, the
  267.     third the tags. If you need both this is what you can do:
  268.  
  269.     ...
  270.        {
  271.        ULONG tags[] = { RTEZ_ReqTitle, (ULONG)"mytitle", TAG_END };
  272.  
  273.        rtEZRequest ("String, num: %s, %ld", NULL, "Ok",
  274.                                            (struct TagItem *)tags, "six", 6);
  275.        }
  276.     ...
  277.  
  278.     You can satisfy the requester with the following keyboard shortcuts:
  279.       'Y' or Left Amiga 'V' for a positive response,
  280.       ESC, 'N', 'R' or Left Amiga 'B' for a negative response.
  281.  
  282.     If EZREQF_NORETURNKEY is _not_ set (see RTEZ_Flags below) the RETURN key
  283.     is also accepted as a shortcut for the positive response (can be changed
  284.     using RTEZ_DefaultResponse, see below).  The response that will be
  285.     selected when you press RETURN will be printed in bold.
  286.  
  287.     The EZREQF_LAMIGAQUAL flag should be used when you put up a requester
  288.     for a destructive action (e.g. to delete something).  When it is set
  289.     the keyboard shortcuts are limited to Left Amiga 'V' and 'B' so it is
  290.     harder to accidently select something you will regret.
  291.     Note that the RETURN and ESC key remain active!  To disable the RETURN
  292.     key use the EZREQF_NORETURNKEY flag.  The ESC key cannot be disabled.
  293.  
  294.     You may pass a NULL for 'gadfmt', but make sure you know what you are
  295.     doing.  Passing a NULL opens an EZRequester with NO responses, just a
  296.     body text.  This implies the user has no means of "answering" this
  297.     requester.  You must therefore use the RT_IDCMPFlags tag to allow some
  298.     other events to end the requester (e.g. IDCMP_MOUSEBUTTONS,
  299.     IDCMP_INACTIVEWINDOW,...) or you must make use of the ReqHandler feature.
  300.     Using a requester handler you can end the requester by program control.
  301.     This way you can e.g. put up a requester before you start loading a file
  302.     and remove it after the file has been loaded.  Do not pass an empty
  303.     string as 'gadfmt'!
  304.  
  305.     'reqinfo' can be used to customize the requester.  For greater control
  306.     use the tags listed below.  The advantage of the rtReqInfo structure is
  307.     that it is global, where tags have to be specified each function call.
  308.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  309.  
  310.   INPUTS
  311.     bodyfmt  - requester body text, can be format string a la RawDoFmt().
  312.     gadfmt   - text for gadgets (left to right, separated by '|') or NULL.
  313.     argarray - pointer to array of arguments for format string(s).
  314.     reqinfo  - pointer to a rtReqInfo structure allocated with
  315.                rtAllocRequest() or NULL.
  316.     taglist  - pointer to a TagItem array.
  317.  
  318.   TAGS
  319.     RT_Window       - (struct Window *)
  320.                       Window that will be used to find the screen to put the
  321.                       requester on.
  322.                       You *MUST* supply this if you are a task calling this
  323.                       function and not a process! This is because tasks
  324.                       don't have a pr_WindowPtr.
  325.     RT_IDCMPFlags   - (ULONG)
  326.                       Extra idcmp flags to return on.  If one these IDCMP
  327.                       flags causes the requester to abort the return code
  328.                       will equal the flag in question.
  329.     RT_ReqPos       - (ULONG)
  330.                       One of the following:
  331.                         REQPOS_POINTER    - requester appears where the mouse
  332.                                             pointer is (default).
  333.                         REQPOS_CENTERSCR  - requester is centered on the
  334.                                             screen.
  335.                         REQPOS_CENTERWIN  - requester is centered in the
  336.                                             window (only works if the
  337.                                             pr_WindowPtr of your process is
  338.                                             valid or if you use RT_Window).
  339.                                             If RT_Window is NULL the
  340.                                             requester will be centered on
  341.                                             the screen.
  342.                         REQPOS_TOPLEFTSCR - requester appears at the top left
  343.                                             of the screen.
  344.                         REQPOS_TOPLEFTWIN - requester appears at the top left
  345.                                             of the window (only works if the
  346.                                             pr_WindowPtr of your process is
  347.                                             valid or if you use RT_Window).
  348.                       The requester will always remain in the visible part of
  349.                       the screen, so if you use the Workbench 2.0 ScreenMode
  350.                       preferences editor to enlarge your Workbench screen and
  351.                       you scroll around, the requester will always appear in
  352.                       the part you can see.
  353.                       REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR also apply to
  354.                       the visible part of the screen. So if you use one of
  355.                       these the requester will be appear in the center or the
  356.                       top left off what you can see of the screen as opposed
  357.                       to the entire screen.
  358.                       REQPOS_CENTERWIN and REQPOS_TOPLEFTWIN fall back to
  359.                       REQPOS_CENTERSCR or REQPOS_TOPLEFTSCR respectively
  360.                       when there is no parent window.  So you can safely use
  361.                       these without worrying about the existence of a window.
  362.     RT_LeftOffset   - (ULONG)
  363.                       Offset of left edge of requester relative to position
  364.                       specified with RT_ReqPos (does not offset the requester
  365.                       when RT_ReqPos is REQPOS_POINTER).
  366.     RT_TopOffset    - (ULONG)
  367.                       Offset of top edge of requester relative to position
  368.                       specified with RT_ReqPos (does not offset the requester
  369.                       when RT_ReqPos is REQPOS_POINTER).
  370.     RT_PubScrName   - (char *)
  371.                       Name of public screen requester should appear on. When
  372.                       this tag is used the RT_Window tag will be ignored.
  373.                       If the public screen is not found the requester will
  374.                       open on the default public screen.
  375.                       Only works on Kickstart 2.0!  reqtools.library does
  376.                       not check this, it is up to you *NOT* to use this tag
  377.                       on Kickstart 1.3 or below!
  378.                       Note that the 1.3 version of reqtools.library also
  379.                       understands and supports this tag (on 2.0).
  380.     RT_Screen       - (struct Screen *)
  381.                       Address of screen to put requester on.  You should
  382.                       never use this, use RT_Window or RT_PubScrName.
  383.     RT_ReqHandler   - (struct rtHandlerInfo **)
  384.                       Using this tag you can start an "asynchronous"
  385.                       requester. ti_TagData of the tag must hold the address
  386.                       of a pointer variable to a rtHandlerInfo structure.
  387.                       The requester will initialize this pointer and will
  388.                       return immediately after its normal initialization.
  389.                       The return code will not be what you would normally
  390.                       expect.  If the return code is _not_ equal to
  391.                       CALL_HANDLER an error occurred and you should take
  392.                       appropriate steps. If the return code was CALL_HANDLER
  393.                       everything went ok and the requester will still be up!
  394.                       See the explanation for rtReqHandlerA() below for the
  395.                       following steps you have to take.
  396.     RT_WaitPointer  - (BOOL)
  397.                       If this is TRUE the window calling the requester will
  398.                       get a standard wait pointer set while the requester is
  399.                       up.  This will happen if you used the RT_Window tag or
  400.                       if your process's pr_WindowPtr is valid.  Note that
  401.                       after the requester has finished your window will be
  402.                       ClearPointer()-ed.  If you used a custom pointer in
  403.                       your window you will have to re-set it, or not use the
  404.                       RT_WaitPointer tag and put up a wait pointer yourself.
  405.                       If your program requires ReqTools V38 it is advised you
  406.                       use RT_LockWindow instead.  Defaults to FALSE.
  407.     RT_LockWindow   - (BOOL) [V38]
  408.                       If this is TRUE the window calling the requester will
  409.                       get locked.  It will no longer accept any user input
  410.                       and it will get standard wait pointer set.  This will
  411.                       happen only if you used the RT_Window tag or if your
  412.                       process's pr_WindowPtr is valid.  RT_LockWindow will
  413.                       restore a custom pointer if you have used one (unlike
  414.                       RT_WaitPointer).  So you do not have to worry about
  415.                       having to restore it yourself.  It is advised you use
  416.                       this tag as much as possible. Defaults to FALSE.
  417.                       Under Kickstart V39 the original window pointer will
  418.                       not be restored if it was set using SetWindowPointer().
  419.                       You will have to restore the pointer yourself in this
  420.                       case.
  421.     RT_ScreenToFront - (BOOL) [V38]
  422.                       Boolean indicating whether to pop the screen the
  423.                       requester will appear on to the front. Default is TRUE.
  424.     RT_ShareIDCMP   - (BOOL) [V38]
  425.                       Boolean indicating whether to share the IDCMP port of
  426.                       the parent window. Use this tag together with the
  427.                       RT_Window tag to indicate the window to share IDCMP
  428.                       with. Sharing the IDCMP port produces less overhead,
  429.                       so it is advised you use this tag. Defaults to FALSE.
  430.     RT_Locale       - (struct Locale *) [V38]
  431.                       Locale to determine what language to use for the
  432.                       requester text.  If this tag is not used or its data
  433.                       is NULL, the system's current default locale will be
  434.                       used. Default NULL.
  435.     RT_IntuiMsgFunc - (struct Hook *) [V38]
  436.                       The requester will call this hook for each IDCMP
  437.                       message it gets that doesn't belong to its window.
  438.                       Only applies if you used the RT_ShareIDCMP tag to share
  439.                       the IDCMP port with the parent window.  Parameters are
  440.                       as follows:
  441.                         A0 - (struct Hook *) your hook
  442.                         A2 - (struct rtReqInfo *) your requester info
  443.                         A1 - (struct IntuiMessage *) the message
  444.                       After you have finished examining the message and your
  445.                       hook returns, ReqTools will reply the message.  So do
  446.                       not reply the message yourself!
  447.     RT_Underscore   - (char) [V38]
  448.                       Indicates the symbol that precedes the character in the
  449.                       gadget label to be underscored.  This is to define a
  450.                       keyboard shortcut for this gadget.  Example: to define
  451.                       the key 'Q' as a keyboard shortcut for "Quit" and 'N'
  452.                       for "Oh, No!" you would use the tag RT_Underscore, '_'
  453.                       and pass as gadfmt "_Quit|Oh, _No!".  Do not use the
  454.                       symbol '%' as it is used for string formatting.  The
  455.                       usual character to use is '_' like in the example.
  456.                       IMPORTANT: the shortcuts defined using RT_Underscore
  457.                       take precedence of the default shortcuts!  It is for
  458.                       example not wise to use a 'N' for a positive response!
  459.                       Pick your shortcuts carefully!
  460.     RT_TextAttr     - (struct TextAttr *) [V38]
  461.                       Use this font for the requester.  Default is to use the
  462.                       screen font.  Note that the font must already be
  463.                       opened by you.  ReqTools will call OpenFont() on this
  464.                       TextAttr, _not_ OpenDiskFont()!  If the font cannot be
  465.                       opened using OpenFont() the default screen font will
  466.                       be used.
  467.     RTEZ_ReqTitle   - (char *)
  468.                       Title of requester window, default is "Request" unless
  469.                       the requester has less than 2 responses, then the
  470.                       default title is "Information".
  471.     RTEZ_Flags      - (ULONG)
  472.                       Flags for rtEZRequestA():
  473.                         EZREQF_NORETURNKEY - turn off the RETURN key as
  474.                                              shortcut for positive response.
  475.                         EZREQF_LAMIGAQUAL  - keyboard shortcuts are limited
  476.                                              to Left Amiga 'V' and 'B', ESC
  477.                                              and RETURN.
  478.                         EZREQF_CENTERTEXT  - centers each line of body text
  479.                                              in the requester window. Useful
  480.                                              for about requesters.
  481.     RTEZ_DefaultResponse - (ULONG)
  482.                       Response value that will be returned when the user
  483.                       presses the return key.  Will be ignored if the
  484.                       EZREQF_NORETURNKEY flag is set.  The text for this
  485.                       response will be printed in bold. Default is 1.
  486.  
  487.   RESULT
  488.     ret - 1 (TRUE) for leftmost (positive) response, then each consecutive
  489.           response will return 1 more, the rightmost (false) response will
  490.           return 0 (FALSE), so 1,2,3,...,num-1,0 -- or idcmp flag.
  491.  
  492.   NOTE
  493.     Automatically adjusts the requester to the screen font.
  494.  
  495.     rtEZRequestA() checks the pr_WindowPtr of your process to find the
  496.     screen to put the requester on.
  497.  
  498.   BUGS
  499.     none known
  500.  
  501.   SEE ALSO
  502.     exec.library/RawDoFmt(), rtReqHandlerA()
  503.  
  504. reqtools.library/rtFileRequestA               reqtools.library/rtFileRequestA
  505.  
  506.   NAME  rtFileRequestA()
  507.  
  508.     ret = rtFileRequestA (filereq, filename, title, taglist);
  509.  
  510.     APTR rtFileRequestA
  511.                 (struct rtFileRequester *, char *, char *, struct TagItem *);
  512.     D0           A1                        A2      A3      A0
  513.  
  514.     ret = rtFileRequest (filereq, filename, title, tag1,...);
  515.  
  516.     APTR rtFileRequest (struct rtFileRequester *, char *, char *, Tag,...);
  517.  
  518.   DESCRIPTION
  519.     Get a directory and filename(s), or just a directory from the user.
  520.  
  521.     'filename' should point to an array of at least 108 chars.  The filename
  522.     already in 'filename' will be displayed in the requester when it comes
  523.     up.  When the requester returns 'filename' will probably have changed.
  524.  
  525.     Using certain tags may result in the calling of a caller-supplied hook.
  526.  
  527.     The hook will be called with A0 holding the address of your hook
  528.     structure (you may use the h_Data field to your own liking), A2 a pointer
  529.     to the requester structure calling the hook ('req') and A1 a pointer to
  530.     an object.  The object is variable and depends on what your hook is for.
  531.  
  532.     This is an example of a hook suitable to be used with the RTFI_FilterFunc
  533.     tag:
  534.  
  535.     SAS/C users can define their function thus:
  536.  
  537.     BOOL __asm __saveds filterfunc (register __a0 struct Hook *filterhook,
  538.        register __a2 struct rtFileRequester *req,
  539.        register __a1 struct FileInfoBlock *fib)
  540.     {
  541.        BOOL accepted = TRUE;
  542.  
  543.        /* examine fib to decide if you want this file in the requester */
  544.        ...
  545.        return (accepted);
  546.     }
  547.  
  548.     Your hook structure should then be initialized like this:
  549.  
  550.        filterhook->h_Entry = filterfunc;
  551.        /* in this case no need to initialize hook->h_SubEntry */
  552.        filterhook->h_Data = your_userdata_if_needed;
  553.  
  554.     You can also use a stub written in machine code to call
  555.     your function. (see 'utility/hooks.h')
  556.  
  557.   INPUTS
  558.     filereq  - pointer to a struct rtFileRequester allocated with
  559.                rtAllocRequestA().
  560.     filename - pointer to an array of chars (must be 108 bytes big).
  561.     title    - pointer to requester window title (null terminated).
  562.     taglist  - pointer to a TagItem array.
  563.  
  564.   TAGS
  565.     RT_Window          - see rtEZRequestA()
  566.     RT_ReqPos          - see rtEZRequestA()
  567.     RT_LeftOffset      - see rtEZRequestA()
  568.     RT_TopOffset       - see rtEZRequestA()
  569.     RT_PubScrName      - see rtEZRequestA()
  570.     RT_Screen          - see rtEZRequestA()
  571.     RT_ReqHandler      - see rtEZRequestA()
  572.     RT_WaitPointer     - see rtEZRequestA()
  573.     RT_LockWindow      - [V38] see rtEZRequestA()
  574.     RT_ScreenToFront   - [V38] see rtEZRequestA()
  575.     RT_ShareIDCMP      - [V38] see rtEZRequestA()
  576.     RT_Locale          - [V38] see rtEZRequestA()
  577.     RT_IntuiMsgFunc    - (struct Hook *) [V38]
  578.                          The requester will call this hook for each IDCMP
  579.                          message it gets that doesn't belong to its window.
  580.                          Only applies if you used the RT_ShareIDCMP tag to
  581.                          share the IDCMP port with the parent window.
  582.                          Parameters are as follows:
  583.                            A0 - (struct Hook *) your hook
  584.                            A2 - (struct rtFileRequester *) your requester
  585.                            A1 - (struct IntuiMessage *) the message
  586.                          After you have finished examining the message and
  587.                          your hook returns, ReqTools will reply the message.
  588.                          So do not reply the message yourself!
  589.     RT_Underscore      - (char) [V38]
  590.                          Indicates the symbol that precedes the character in
  591.                          a gadget's label to be underscored.  This will also
  592.                          define the keyboard shortcut for this gadget.
  593.                          Currently only needed for RTFI_OkText.  Usually set
  594.                          to '_'.
  595.     RT_DefaultFont     - (struct TextFont *)
  596.                          This tag allows you to specify the font to be used
  597.                          in the requester when the screen font is
  598.                          proportional. Default is GfxBase->DefaultFont.
  599.     RT_TextAttr        - (struct TextAttr *) [V38]
  600.                          Use this font for the requester.  Must be a fixed
  601.                          width font, _not_ a proportional one.  Default is to
  602.                          use the screen font or the default font (if the
  603.                          screen font is proportional).  Note that the font
  604.                          must already be opened by you.  ReqTools will call
  605.                          OpenFont() on this TextAttr, _not_ OpenDiskFont()!
  606.                          If the font cannot be opened using OpenFont() or if
  607.                          the font is proportional the default screen font
  608.                          will be used (or the font set with RT_DefaultFont).
  609.     RTFI_Flags         - (ULONG)
  610.                          Several flags:
  611.                            FREQF_NOBUFFER    - do _not_ use a buffer to
  612.                                                remember directory contents
  613.                                                for the next time the file
  614.                                                requester is used.
  615.                            FREQF_MULTISELECT - allow multiple files to be
  616.                                                selected. rtFileRequest() will
  617.                                                return a pointer to an
  618.                                                rtFileList structure which
  619.                                                will contain all selected
  620.                                                files.  Use rtFreeFileList()
  621.                                                to free the memory used by
  622.                                                this file list.
  623.                            FREQF_SELECTDIRS  - set this flag if you wish to
  624.                                                enable the selecting of dirs
  625.                                                as well as files.  You *must*
  626.                                                also set FREQF_MULTISELECT.
  627.                                                Directories will be returned
  628.                                                together with files in
  629.                                                rtFileList, but with StrLen
  630.                                                equal to -1.  If you need the
  631.                                                length of the directory's name
  632.                                                use strlen().
  633.                            FREQF_SAVE        - Set this if you are using the
  634.                                                requester to save or delete
  635.                                                something.  Double-clicking
  636.                                                will be disabled so it is
  637.                                                harder to make a mistake and
  638.                                                select the wrong file.  If the
  639.                                                user enters a non-existent
  640.                                                directory in the drawer string
  641.                                                gadget, a requester will
  642.                                                appear asking if the directory
  643.                                                should be created.
  644.                            FREQF_NOFILES     - Set this if you want to use
  645.                                                the requester to allow the
  646.                                                user to select a directory
  647.                                                rather than a file.  Ideal for
  648.                                                getting a destination dir. May
  649.                                                be used with FREQF_MULTISELECT
  650.                                                and FREQF_SELECTDIRS.
  651.                            FREQF_PATGAD      - When this is set a pattern
  652.                                                gadget will be added to the
  653.                                                requester.
  654.     RTFI_Height        - (ULONG)
  655.                          Suggested height of file requester window.
  656.     RTFI_OkText        - (char *)
  657.                          Replacement text for "Ok" gadget, max 6 chars long.
  658.     RTFI_VolumeRequest - (ULONG) [V38]
  659.                          The presence of this tag turns the file requester
  660.                          into a volume/assign disk requester.  This requester
  661.                          can be used to get a device name ("DF0:", "DH1:",..)
  662.                          or an assign ("C:", "FONTS:",...) from the user.
  663.                          The result of this requester can be found in the
  664.                          filereq->Dir field.  The volume can also be changed
  665.                          with rtChangeReqAttrA() and the RTFI_Dir tag.  Note
  666.                          that the user may edit the disk/assign names, or
  667.                          enter a new one.  Note also that the real device
  668.                          name is returned, not the name of the volume in the
  669.                          device.  For example "DH1:", not "Hard1:".
  670.                          The tag data (ULONG) is used to set following flags:
  671.                            VREQF_NOASSIGNS - Do not include the assigns in
  672.                                              the list, only the real devices.
  673.                            VREQF_NODISKS   - Do not include devices, just
  674.                                              show the assigns.
  675.                            VREQF_ALLDISKS  - Show _all_ devices.  Default
  676.                                              behavior is to show only those
  677.                                              devices which have valid disks
  678.                                              inserted into them.  So if you
  679.                                              have no disk in drive DF0: it
  680.                                              will not show up.  Set this flag
  681.                                              if you do want these devices
  682.                                              included.
  683.                          NOTE: Do *NOT* use { RTFI_VolumeRequest, TRUE }!
  684.                                You are then setting the VREQF_NOASSIGNS flag!
  685.                                Use { RTFI_VolumeRequest, 0 } for a normal
  686.                                volume requester.
  687.                          NOTE: If you use the RTFI_FilterFunc described
  688.                                below the third parameter will be a pointer
  689.                                to a rtVolumeEntry structure rather than a
  690.                                pointer to a FileInfoBlock structure!
  691.                                Tech note: the DOS device list has been
  692.                                unlocked, so it is safe to e.g. Lock() this
  693.                                device and call Info() on this lock.
  694.                          NOTE: A file requester structure allocated with
  695.                                rtAllocRequest() should not be used for both
  696.                                a file and a volume requester. Allocate two
  697.                                requester structures if you need both a file
  698.                                and a volume requester in your program!
  699.     RTFI_FilterFunc    - (struct Hook *) [V38]
  700.                          Call this hook for each file in the directory being
  701.                          read (or for each entry in the volume requester).
  702.                          Parameters are as follows:
  703.                            A0 - (struct Hook *) your hook
  704.                            A2 - (struct rtFileRequester *) your filereq
  705.                            A1 - (struct FileInfoBlock *) fib of file OR
  706.                                 (struct rtVolumeEntry *) device or assign
  707.                                 in case of a volume requester.
  708.                          If your hook returns TRUE the file will be accepted.
  709.                          If it returns FALSE the file will be skipped and
  710.                          will not appear in the requester.
  711.                          IMPORTANT NOTE: If you change your hook's behavior
  712.                                          you _MUST_ purge the requester's
  713.                                          buffer (using rtFreeReqBuffer())!
  714.                          IMPORTANT NOTE: When this callback hook is called
  715.                                          from a volume requester the
  716.                                          pr_WindowPtr of your process will
  717.                                          be set to -1 so *no* DOS requesters
  718.                                          will appear when an error occurs!
  719.     RTFI_AllowEmpty    - (BOOL) [V38]
  720.                          If RTFI_AllowEmpty is TRUE an empty file string will
  721.                          also be accepted and returned.  Defaults to FALSE,
  722.                          meaning that if the user enters no filename the
  723.                          requester will be canceled.  You should use this tag
  724.                          as little as possible!
  725.  
  726.   RESULT
  727.     ret - TRUE if the user selected a file (check 'filereq->Dir' for the
  728.           directory and 'filename' for the filename) or FALSE if the
  729.           requester was canceled -- or a pointer to a struct rtFileList
  730.           (if FREQF_MULTISELECT was used).
  731.  
  732.   NOTE
  733.     You CANNOT call the file requester from a task because it uses DOS calls!
  734.  
  735.     Automatically adjusts the requester to the screen font.
  736.     If the screen font is proportional the default font will be used.
  737.  
  738.     If the requester got too big for the screen because of a very large font,
  739.     the topaz.font will be used.
  740.  
  741.     rtFileRequest() checks the pr_WindowPtr of your process to find the
  742.     screen to put the requester on.
  743.  
  744.   BUGS
  745.     none known
  746.  
  747.   SEE ALSO
  748.  
  749. reqtools.library/rtFontRequestA               reqtools.library/rtFontRequestA
  750.  
  751.   NAME  rtFontRequestA()
  752.  
  753.     bool = rtFontRequestA (fontreq, title, taglist);
  754.  
  755.     BOOL rtFontRequestA (struct rtFontRequester *, char *, struct TagItem *);
  756.     D0                   A1                        A3      A0
  757.  
  758.     bool = rtFontRequest (fontreq, title, tag1,...);
  759.  
  760.     BOOL rtFontRequest (struct rtFontRequester *, char *, Tag,...);
  761.  
  762.   DESCRIPTION
  763.     Let the user select a font and a style (optional).
  764.  
  765.   INPUTS
  766.     fontreq  - pointer to a struct rtFontRequester allocated with
  767.                rtAllocRequestA().
  768.     title    - pointer to requester window title (null terminated).
  769.     taglist  - pointer to a TagItem array.
  770.  
  771.   TAGS
  772.     RT_Window         - see rtEZRequestA()
  773.     RT_ReqPos         - see rtEZRequestA()
  774.     RT_LeftOffset     - see rtEZRequestA()
  775.     RT_TopOffset      - see rtEZRequestA()
  776.     RT_PubScrName     - see rtEZRequestA()
  777.     RT_Screen         - see rtEZRequestA()
  778.     RT_ReqHandler     - see rtEZRequestA()
  779.     RT_WaitPointer    - see rtEZRequestA()
  780.     RT_LockWindow     - [V38] see rtEZRequestA()
  781.     RT_ScreenToFront  - [V38] see rtEZRequestA()
  782.     RT_ShareIDCMP     - [V38] see rtEZRequestA()
  783.     RT_Locale         - [V38] see rtEZRequestA()
  784.     RT_IntuiMsgFunc   - (struct Hook *) [V38]
  785.                         The requester will call this hook for each IDCMP
  786.                         message it gets that doesn't belong to its window.
  787.                         Only applies if you used the RT_ShareIDCMP tag to
  788.                         share the IDCMP port with the parent window.
  789.                         Parameters are as follows:
  790.                           A0 - (struct Hook *) your hook
  791.                           A2 - (struct rtFontRequester *) your requester
  792.                           A1 - (struct IntuiMessage *) the message
  793.                         After you have finished examining the message and
  794.                         your hook returns, ReqTools will reply the message.
  795.                         So do not reply the message yourself!
  796.     RT_Underscore     - (char) [V38]
  797.                         Indicates the symbol that precedes the character in
  798.                         a gadget's label to be underscored.  This will also
  799.                         define the keyboard shortcut for this gadget.
  800.                         Currently only needed for RTFO_OkText.  Usually set
  801.                         to '_'.
  802.     RT_DefaultFont    - (struct TextFont *)
  803.                         This tag allows you to specify the font to be used in
  804.                         the requester when the screen font is proportional.
  805.                         Default is GfxBase->DefaultFont.
  806.     RT_TextAttr       - [V38] see rtFileRequestA()
  807.                         Remember: font cannot be proportional!
  808.     RTFO_Flags        - (ULONG)
  809.                         Several flags:
  810.                           FREQF_NOBUFFER      - do not buffer the font list
  811.                                                 for subsequent calls to
  812.                                                 rtFontRequestA().
  813.                           FREQF_FIXEDWIDTH    - only show fixed-width fonts.
  814.                           FREQF_COLORFONTS    - show color fonts also.
  815.                           FREQF_CHANGEPALETTE - change the screen's palette
  816.                                                 to match that of a selected
  817.                                                 color font.
  818.                           FREQF_LEAVEPALETTE  - leave the palette as it is
  819.                                                 when exiting rtFontRequestA()
  820.                                                 Useful in combination with
  821.                                                 FREQF_CHANGEPALETTE.
  822.                           FREQF_SCALE         - allow fonts to be scaled
  823.                                                 when they don't exist in the
  824.                                                 requested size.
  825.                                                 (works on Kickstart 2.0 only,                                                
  826.                                                  has no effect on 1.2/1.3).
  827.                           FREQF_STYLE         - include gadgets so the user
  828.                                                 may select the font's style.
  829.     RTFO_Height       - (ULONG)
  830.                         Suggested height of font requester window.
  831.     RTFO_OkText       - (char *)
  832.                         Replacement text for "Ok" gadget.  Maximum 6 chars.
  833.                         (7 is still ok, but not esthetically pleasing)
  834.     RTFO_SampleHeight - (ULONG)
  835.                         Height of font sample display in pixels (default 24).
  836.     RTFO_MinHeight    - (ULONG)
  837.                         Minimum font size displayed.
  838.     RTFO_MaxHeight    - (ULONG)
  839.                         Maximum font size displayed.
  840.     RTFO_FilterFunc   - (struct Hook *) [V38]
  841.                         Call this hook for each available font.
  842.                         Parameters are as follows:
  843.                           A0 - (struct Hook *) your hook
  844.                           A2 - (struct rtFontRequester *) your filereq
  845.                           A1 - (struct TextAttr *) textattr of font
  846.                         If your hook returns TRUE the font will be accepted.
  847.                         If it returns FALSE the font will be skipped and
  848.                         will not appear in the requester.
  849.                         IMPORTANT NOTE:  If you change your hook's behavior
  850.                         you _MUST_ purge the requester's buffer (using
  851.                         rtFreeReqBuffer())!
  852.  
  853.   RESULT
  854.     bool - TRUE if the user selected a font (freq->Attr holds the font),
  855.            FALSE if the requester was canceled.
  856.  
  857.   NOTE
  858.     You CANNOT call the font requester from a task because it may use DOS
  859.     calls!
  860.  
  861.     Automatically adjusts the requester to the screen font.
  862.     If the screen font is proportional the default font will be used.
  863.  
  864.     If the requester got too big for the screen because of a very large font,
  865.     the topaz.font will be used.
  866.  
  867.     rtFontRequest() checks the pr_WindowPtr of your process to find the
  868.     screen to put the requester on.
  869.  
  870.   BUGS
  871.     none known
  872.  
  873.   SEE ALSO
  874.  
  875. reqtools.library/rtFreeFileList               reqtools.library/rtFreeFileList
  876.  
  877.   NAME  rtFreeFileList()
  878.  
  879.     rtFreeFileList (filelist);
  880.  
  881.     void rtFreeFileList (struct rtFileList *);
  882.                          A0
  883.  
  884.   DESCRIPTION
  885.     Frees a filelist returned by rtFileRequest() when the FREQF_MULTISELECT
  886.     flag was set.  Call this after you have scanned the filelist and you no
  887.     longer need it.
  888.  
  889.   INPUTS
  890.     filelist - pointer to rtFileList structure, returned by rtFileRequest()
  891.                (may be NULL).
  892.  
  893.   RESULT
  894.     none
  895.  
  896.   BUGS
  897.     none known
  898.  
  899.   SEE ALSO
  900.     rtFileRequest()
  901.  
  902. reqtools.library/rtFreeReqBuffer             reqtools.library/rtFreeReqBuffer
  903.  
  904.   NAME  rtFreeReqBuffer()
  905.  
  906.     rtFreeReqBuffer (req);
  907.  
  908.     void rtFreeReqBuffer (APTR);
  909.                           A1
  910.  
  911.   DESCRIPTION
  912.     Frees the buffer associated with 'req'.  In case of a file requester this
  913.     function will deallocate the directory buffer, in case of a font
  914.     requester the font list.
  915.  
  916.     It is safe to call this function for requesters that have no buffer, so
  917.     you may call this for all requesters to free as much memory as possible.
  918.  
  919.   INPUTS
  920.     req - pointer to requester.
  921.  
  922.   RESULT
  923.     none
  924.  
  925.   BUGS
  926.     none known
  927.  
  928.   SEE ALSO
  929.     rtFileRequest(), rtFontRequest()
  930.  
  931. reqtools.library/rtFreeRequest                 reqtools.library/rtFreeRequest
  932.  
  933.   NAME  rtFreeRequest()
  934.  
  935.     rtFreeRequest (req);
  936.  
  937.     void rtFreeRequest (APTR);
  938.                         A1
  939.  
  940.   DESCRIPTION
  941.     Free requester structure previously allocated by rtAllocRequestA().
  942.     This will also free all buffers associated with the requester, so there
  943.     is no need to call rtFreeReqBuffer() first.
  944.  
  945.   INPUTS
  946.     req - pointer to requester (may be NULL).
  947.  
  948.   RESULT
  949.     none
  950.  
  951.   BUGS
  952.     none known
  953.  
  954.   SEE ALSO
  955.     rtAllocRequestA()
  956.  
  957. reqtools.library/rtGetLongA                       reqtools.library/rtGetLongA
  958.  
  959.   NAME  rtGetLongA()
  960.  
  961.     ret = rtGetLongA (&longvar, title, reqinfo, taglist);
  962.  
  963.     ULONG rtGetLongA (ULONG *, char *, struct rtReqInfo *, struct TagItem *);
  964.     D0                A1       A2      A3                  A0
  965.  
  966.     ret = rtGetLong (&longvar, title, reqinfo, tag1,...);
  967.  
  968.     ULONG rtGetLong (ULONG *, char *, struct rtReqInfo *, Tag,...);
  969.  
  970.   DESCRIPTION
  971.     Puts up a requester to get a signed long (32-bit) number from the user.
  972.  
  973.     'reqinfo' can be used to customize the requester.  For greater control
  974.     use the tags listed below.  The advantage of the rtReqInfo structure is
  975.     that it is global, where tags have to be specified each function call.
  976.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  977.  
  978.   INPUTS
  979.     &longvar - address of long (32 bit!) variable to hold result.
  980.     title    - pointer to null terminated title of requester window.
  981.     reqinfo  - pointer to a rtReqInfo structure allocated with
  982.                rtAllocRequest() or NULL.
  983.     taglist  - pointer to a TagItem array.
  984.  
  985.   TAGS
  986.     RT_Window        - see rtEZRequestA()
  987.     RT_IDCMPFlags    - see rtEZRequestA()
  988.     RT_ReqPos        - see rtEZRequestA()
  989.     RT_LeftOffset    - see rtEZRequestA()
  990.     RT_TopOffset     - see rtEZRequestA()
  991.     RT_PubScrName    - see rtEZRequestA()
  992.     RT_Screen        - see rtEZRequestA()
  993.     RT_ReqHandler    - see rtEZRequestA()
  994.     RT_WaitPointer   - see rtEZRequestA()
  995.     RT_Underscore    - [V38] see rtEZRequestA()
  996.                        Only when you also use the RTGL_GadFmt tag.
  997.     RT_LockWindow    - [V38] see rtEZRequestA()
  998.     RT_ScreenToFront - [V38] see rtEZRequestA()
  999.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1000.     RT_Locale        - [V38] see rtEZRequestA()
  1001.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1002.     RT_TextAttr      - [V38] see rtEZRequestA()
  1003.                        Note that under 1.2/1.3 the string gadget's font
  1004.                        will remain the screen font.
  1005.     RTGL_Min         - (ULONG)
  1006.                        Minimum allowed value. If the user tries to enter a
  1007.                        smaller value the requester will refuse to accept it.
  1008.     RTGL_Max         - (ULONG)
  1009.                        Maximum allowed value, higher values are refused.
  1010.     RTGL_Width       - (ULONG)
  1011.                        Width of requester window in pixels.  This is only a
  1012.                        suggestion. rtGetLongA() will not go below a
  1013.                        certain width.
  1014.     RTGL_ShowDefault - (BOOL)
  1015.                        If this is TRUE (default) the value already in
  1016.                        'longvar' will be displayed in the requester when it
  1017.                        comes up. If set to FALSE the requester will be empty.
  1018.     RTGL_GadFmt      - (char *) [V38]
  1019.                        Using this tag you can offer the user several
  1020.                        responses.  See rtEZRequestA() for more information.
  1021.                        Note that selecting this gadget is considered a
  1022.                        positive response so the integer in the gadget is
  1023.                        copied to '&longvar'.
  1024.     RTGL_GadFmtArgs  - (APTR) [V38]
  1025.                        If you used formatting codes with RTGL_GadFmt use this
  1026.                        tag to pass the arguments.
  1027.     RTGL_Invisible   - (BOOL) [V38]
  1028.                        Using this tag you can switch on invisible typing.
  1029.                        Very useful if you need to get something like a
  1030.                        code number from the user.  It is strongly advised to
  1031.                        use { RTGL_ShowDefault, FALSE } or the user may get 
  1032.                        very confused!  Default is FALSE.
  1033.     RTGL_BackFill    - (BOOL) [V38]
  1034.                        Backfill requester window with pattern.  Default TRUE.
  1035.     RTGL_TextFmt     - (char *) [V38]
  1036.                        Print these lines of text above the gadget in the
  1037.                        requester.  Very useful to inform the user of what
  1038.                        he should enter.  Most of the time you will also want
  1039.                        to set the GLREQF_CENTERTEXT flag.  If you set the
  1040.                        RTGL_BackFill tag to FALSE _no_ recessed border will
  1041.                        be placed around the text.  Formatting codes may be
  1042.                        used in the string (see RTGL_TextFmtArgs tag).
  1043.     RTGL_TextFmtArgs - (APTR) [V38]
  1044.                        If you used formatting codes with RTGL_TextFmt use
  1045.                        this tag to pass the arguments.
  1046.     RTGL_Flags       - (ULONG) [V38]
  1047.                          GLREQF_CENTERTEXT    - centers each line of text
  1048.                                                 above the gadget in the
  1049.                                                 requester window. Should
  1050.                                                 be generally set.
  1051.                          GLREQF_HIGHLIGHTTEXT - Highlight text above the
  1052.                                                 gadget. You will normally
  1053.                                                 only want to use this if you
  1054.                                                 also turned off the window
  1055.                                                 backfilling.
  1056.  
  1057.   RESULT
  1058.     ret - TRUE if user entered a number, FALSE if not. If one of your idcmp
  1059.           flags caused the requester to end 'ret' will hold this flag.
  1060.           If you used the RTGL_GadFmt tag the return code will hold the
  1061.           value of the response as with rtEZRequestA().
  1062.  
  1063.   NOTE
  1064.     'longvar' will NOT change if the requester is aborted.
  1065.  
  1066.     Automatically adjusts the requester to the screen font.
  1067.  
  1068.     rtGetLongA() checks the pr_WindowPtr of your process to find the
  1069.     screen to put the requester on.
  1070.  
  1071.     If you use the RTGL_GadFmt tag the return value is not always the gadget
  1072.     the user selected.  If the integer gadget is empty and the user presses
  1073.     the leftmost gadget (normally 'Ok') rtGetLong() will return 0 (FALSE)!
  1074.     If the integer gadget is empty and the user presses one of the other
  1075.     gadgets rtGetLong() _will_ return its value!  Important: &longvar will
  1076.     not be changed in either of these cases.
  1077.  
  1078.   BUGS
  1079.     none known
  1080.  
  1081.   SEE ALSO
  1082.  
  1083. reqtools.library/rtGetStringA                   reqtools.library/rtGetStringA
  1084.  
  1085.   NAME  rtGetStringA()
  1086.  
  1087.     ret = rtGetStringA (buffer, maxchars, title, reqinfo, taglist);
  1088.  
  1089.     ULONG rtGetStringA
  1090.               (UBYTE *, ULONG, char *, struct rtReqInfo *, struct TagItem *);
  1091.     D0         A1       D0     A2      A3                  A0
  1092.  
  1093.     ret = rtGetString (buffer, maxchars, title, reqinfo, tag1,...);
  1094.  
  1095.     ULONG rtGetString (UBYTE *, ULONG, char *, struct rtReqInfo *, Tag,...);
  1096.  
  1097.   DESCRIPTION
  1098.     Puts up a string requester to get a line of text from the user.
  1099.     The string present in 'buffer' upon entry will be displayed, ready to
  1100.     be edited.
  1101.  
  1102.     'reqinfo' can be used to customize the requester.  For greater control
  1103.     use the tags listed below.  The advantage of the rtReqInfo structure is
  1104.     that it is global, where tags have to be specified each function call.
  1105.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  1106.  
  1107.   INPUTS
  1108.     buffer   - pointer to buffer to hold characters entered.
  1109.     maxchars - maximum number of characters that fit in buffer (EX-cluding
  1110.                the 0 to terminate the string !).
  1111.     title    - pointer to null terminated title of requester window.
  1112.     reqinfo  - pointer to a rtReqInfo structure allocated with
  1113.                rtAllocRequest() or NULL.
  1114.     taglist  - pointer to a TagItem array.
  1115.  
  1116.   TAGS
  1117.     RT_Window        - see rtEZRequestA()
  1118.     RT_IDCMPFlags    - see rtEZRequestA()
  1119.     RT_ReqPos        - see rtEZRequestA()
  1120.     RT_LeftOffset    - see rtEZRequestA()
  1121.     RT_TopOffset     - see rtEZRequestA()
  1122.     RT_PubScrName    - see rtEZRequestA()
  1123.     RT_Screen        - see rtEZRequestA()
  1124.     RT_ReqHandler    - see rtEZRequestA()
  1125.     RT_WaitPointer   - see rtEZRequestA()
  1126.     RT_Underscore    - [V38] see rtEZRequestA()
  1127.                        Only when you also use the RTGS_GadFmt tag.
  1128.     RT_LockWindow    - [V38] see rtEZRequestA()
  1129.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1130.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1131.     RT_Locale        - [V38] see rtEZRequestA()
  1132.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1133.     RT_TextAttr      - [V38] see rtEZRequestA()
  1134.                        Note that under 1.2/1.3 the string gadget's font
  1135.                        will remain the screen font.
  1136.     RTGS_Width       - (ULONG)
  1137.                        Width of requester window in pixels.  This is only a
  1138.                        suggestion. rtGetStringA() will not go below a certain
  1139.                        width.
  1140.     RTGS_AllowEmpty  - (BOOL)
  1141.                        If RTGS_AllowEmpty is TRUE an empty string will also
  1142.                        be accepted and returned.  Defaults to FALSE, meaning
  1143.                        that if the user enters an empty string the requester
  1144.                        will be canceled.
  1145.     RTGS_GadFmt      - (char *) [V38]
  1146.                        Using this tag you can offer the user several
  1147.                        responses.  See rtEZRequestA() for more information.
  1148.                        Note that selecting this gadget is considered a
  1149.                        positive response so the string in the gadget is
  1150.                        copied to 'buffer'.
  1151.     RTGS_GadFmtArgs  - (APTR) [V38]
  1152.                        If you used formatting codes with RTGS_GadFmt use this
  1153.                        tag to pass the arguments.
  1154.     RTGS_Invisible   - (BOOL) [V38]
  1155.                        Using this tag you can switch on invisible typing.
  1156.                        Very useful if you need to get something like a
  1157.                        password from the user.  It is strongly advised to use
  1158.                        an empty initial string or the user may get very
  1159.                        confused!  Default is FALSE.
  1160.     RTGS_BackFill    - (BOOL) [V38]
  1161.                        Backfill requester window with pattern.  Default TRUE.
  1162.     RTGS_TextFmt     - (char *) [V38]
  1163.                        Print these lines of text above the gadget in the
  1164.                        requester.  Very useful to inform the user of what
  1165.                        he should enter.  Most of the time you will also want
  1166.                        to set the GSREQF_CENTERTEXT flag.  If you set the
  1167.                        RTGS_BackFill tag to FALSE _no_ recessed border will
  1168.                        be placed around the text.  Formatting codes may be
  1169.                        used in the string (see RTGS_TextFmtArgs tag).
  1170.     RTGS_TextFmtArgs - (APTR) [V38]
  1171.                        If you used formatting codes with RTGS_TextFmt use
  1172.                        this tag to pass the arguments.
  1173.     RTGS_Flags       - (ULONG) [V38]
  1174.                          GSREQF_CENTERTEXT    - centers each line of text
  1175.                                                 above the gadget in the
  1176.                                                 requester window. Should
  1177.                                                 be generally set.
  1178.                          GSREQF_HIGHLIGHTTEXT - Highlight text above the
  1179.                                                 gadget. You will normally
  1180.                                                 only want to use this if you
  1181.                                                 also turned off the window
  1182.                                                 backfilling.
  1183.  
  1184.   RESULT
  1185.     ret - TRUE if user entered something, FALSE if not. If one of your idcmp
  1186.           flags caused the requester to end 'ret' will hold this flag.
  1187.           If you used the RTGS_GadFmt tag the return code will hold the
  1188.           value of the response as with rtEZRequestA().
  1189.  
  1190.   NOTE
  1191.     The contents of the buffer will NOT change if the requester is aborted.
  1192.  
  1193.     Automatically adjusts the requester to the screen font.
  1194.  
  1195.     rtGetStringA() checks the pr_WindowPtr of your process to find the
  1196.     screen to put the requester on.
  1197.  
  1198.     If you use the RTGS_GadFmt tag the return value is not always the gadget
  1199.     the user selected.  If the string gadget is empty and the user presses
  1200.     the leftmost gadget (normally 'Ok') rtGetString() will return 0 (FALSE)!
  1201.     If the string gadget is empty and the user presses one of the other
  1202.     gadgets rtGetString() _will_ return its value!  Important: 'buffer' will
  1203.     not be changed in either of these cases.
  1204.     If you set the RTGS_AllowEmpty tag to TRUE 'buffer' will always be
  1205.     changed of course, and rtGetString() will always return the value of the
  1206.     gadget pressed.
  1207.  
  1208.   BUGS
  1209.     none known
  1210.  
  1211.   SEE ALSO
  1212.  
  1213. reqtools.library/rtGetVScreenSize           reqtools.library/rtGetVScreenSize
  1214.  
  1215.   NAME  rtGetVScreenSize()
  1216.  
  1217.     rtGetVScreenSize (screen, widthptr, heightptr);
  1218.  
  1219.     ULONG rtGetVScreenSize (struct Screen *, ULONG *, ULONG *);
  1220.     D0                      A0               A1       A2
  1221.  
  1222.   DESCRIPTION
  1223.     Use this function to get the size of the visible portion of a screen.
  1224.  
  1225.     The value returned by rtGetVScreenSize() can be used for vertical
  1226.     spacing.  It will be larger for interlaced and productivity screens.
  1227.     Using this number for spacing will assure your requester will look
  1228.     good on an interlaced and a non-interlaced screen.
  1229.  
  1230.     Current return codes are 2 for non-interlaced and 4 for interlaced.
  1231.     These values may change in the future, don't depend on them too much.
  1232.     They will in any case remain of the same magnitude.
  1233.  
  1234.   INPUTS
  1235.     screen    - pointer to the screen.
  1236.     widthptr  - address of an ULONG variable to hold the width.
  1237.     heightptr - address of an ULONG variable to hold the height.
  1238.  
  1239.   RESULT
  1240.     none
  1241.  
  1242.   NOTE
  1243.     This function is for the advanced ReqTools user.
  1244.  
  1245.   BUGS
  1246.  
  1247.   SEE ALSO
  1248.  
  1249. reqtools.library/rtLockWindow                   reqtools.library/rtLockWindow
  1250.  
  1251.   NAME  rtLockWindow() [V38]
  1252.  
  1253.     windowlock = rtLockWindow (window);
  1254.  
  1255.     APTR rtLockWindow (struct Window *);
  1256.     D0                 A0
  1257.  
  1258.   DESCRIPTION
  1259.     Lock a window so it will no longer accept any user input.  The only
  1260.     functions left to the user are depth arrangement and window dragging.
  1261.     All gadgets will be un-selectable and the window can not be resized.
  1262.     It will also get the standard wait pointer set.  The pointer at the
  1263.     time of locking will be restored when the window is unlocked.
  1264.  
  1265.     You may nest calls to rtLockWindow() and rtUnlockWindow().  Just make
  1266.     sure you unlock the window in the correct (opposite) order.
  1267.  
  1268.     See the RT_LockWindow tag for an automatic way of locking your window.
  1269.  
  1270.     Use this function (and rtUnlockWindow()) instead of rtSetWaitPointer().
  1271.  
  1272.   INPUTS
  1273.     window - pointer to the window to be locked.
  1274.  
  1275.   RESULT
  1276.     windowlock - a pointer to a (private) window lock.  You must pass this
  1277.                  to rtUnlockWindow() to unlock the window again.
  1278.                  Never mind if this is NULL.  This means there was not enough
  1279.                  memory and the window will not be locked.  There is no
  1280.                  sense in reporting this, just carry on and pass the NULL
  1281.                  window lock to rtUnlockWindow().
  1282.  
  1283.   NOTE
  1284.     The wait pointer will look exactly like the standard Workbench 2.0
  1285.     wait pointer.  In combination with PointerX, ClockTick or LacePointer
  1286.     the handle will turn.
  1287.  
  1288.   BUGS
  1289.     none known
  1290.  
  1291.   SEE ALSO
  1292.  
  1293. reqtools.library/rtPaletteRequestA         reqtools.library/rtPaletteRequestA
  1294.  
  1295.   NAME  rtPaletteRequestA()
  1296.  
  1297.     color = rtPaletteRequestA (title, reqinfo, taglist);
  1298.  
  1299.     LONG rtPaletteRequestA (char *, struct rtReqInfo *, struct TagItem *);
  1300.     D0                      A2      A3                  A0
  1301.  
  1302.     color = rtPaletteRequest (title, reqinfo, tag1,...);
  1303.  
  1304.     LONG rtPaletteRequest (char *, struct rtReqInfo *, Tag,...);
  1305.  
  1306.   DESCRIPTION
  1307.     Put up a palette requester so the user can change the screen's colors.
  1308.  
  1309.     The colors are changed in the viewport of the screen the requester will
  1310.     appear on, so that is where you will find them after the palette
  1311.     requester returns.
  1312.  
  1313.     The selected color is returned, so you can also use this requester to let
  1314.     the user select a color.
  1315.  
  1316.     'reqinfo' can be used to customize the requester.  For greater control
  1317.     use the tags listed below.  The advantage of the rtReqInfo structure is
  1318.     that it is global, where tags have to be specified each function call.
  1319.     See libraries/reqtools.[hi] for a description of the rtReqInfo structure.
  1320.  
  1321.   INPUTS
  1322.     title   - pointer to requester window title (null terminated).
  1323.     reqinfo - pointer to a rtReqInfo structure allocated with
  1324.               rtAllocRequest() or NULL.
  1325.     taglist - pointer to a TagItem array.
  1326.  
  1327.   TAGS
  1328.     RT_Window        - see rtEZRequestA()
  1329.     RT_ReqPos        - see rtEZRequestA()
  1330.     RT_LeftOffset    - see rtEZRequestA()
  1331.     RT_TopOffset     - see rtEZRequestA()
  1332.     RT_PubScrName    - see rtEZRequestA()
  1333.     RT_Screen        - see rtEZRequestA()
  1334.     RT_ReqHandler    - see rtEZRequestA()
  1335.     RT_WaitPointer   - see rtEZRequestA()
  1336.     RT_LockWindow    - [V38] see rtEZRequestA()
  1337.     RT_ScreenToFront - [V38] see rtEZRequestA()
  1338.     RT_ShareIDCMP    - [V38] see rtEZRequestA()
  1339.     RT_Locale        - [V38] see rtEZRequestA()
  1340.     RT_IntuiMsgFunc  - [V38] see rtEZRequestA()
  1341.     RT_DefaultFont   - (struct TextFont *)
  1342.                        This tag allows you to specify the font to be used in
  1343.                        the requester when the screen font is proportional.
  1344.                        Default is GfxBase->DefaultFont.
  1345.     RT_TextAttr      - [V38] see rtFileRequestA()
  1346.                        Remember: font cannot be proportional!
  1347.     RTPA_Color       - (ULONG)
  1348.                        Initially selected color of palette.  Default is 1.
  1349.  
  1350.   RESULT
  1351.     color - the color number of the selected color or -1 if the user
  1352.             canceled the requester.
  1353.  
  1354.   NOTE
  1355.     Automatically adjusts the requester to the screen font.
  1356.     If the screen font is proportional the default font will be used.
  1357.  
  1358.     If the requester got too big for the screen because of a very large font,
  1359.     the topaz.font will be used.
  1360.  
  1361.     rtPaletteRequestA() checks the pr_WindowPtr of your process to find the
  1362.     screen to put the requester on.
  1363.  
  1364.   BUGS
  1365.     none known
  1366.  
  1367.   SEE ALSO
  1368.  
  1369. reqtools.library/rtReqHandlerA                 reqtools.library/rtReqHandlerA
  1370.  
  1371.   NAME  rtReqHandlerA()
  1372.  
  1373.     ret = rtReqHandlerA (handlerinfo, sigs, taglist);
  1374.  
  1375.     ULONG rtReqHandlerA (struct rtHandlerInfo *, ULONG, struct TagItem *);
  1376.     D0                   A1                      D0     A0
  1377.  
  1378.     ret = rtReqHandler (handlerinfo, sigs, tag1,...);
  1379.  
  1380.     ULONG rtReqHandler (struct rtHandlerInfo *, ULONG, Tag,...);
  1381.  
  1382.   DESCRIPTION
  1383.     This function should be called if you used the RT_ReqHandler tag with a
  1384.     requester function.
  1385.  
  1386.     The requester you used the tag with will have returned immediately after
  1387.     its initialization and will have initialized a pointer to a rtHandlerInfo
  1388.     structure for you.
  1389.     You should now do the following:
  1390.  
  1391.     Check the DoNotWait field. If it is FALSE you have to wait for the
  1392.     signals in the WaitMask field (plus your own signals if you like).
  1393.     If any of the signals in WaitMask are received or DoNotWait was not FALSE
  1394.     you have to call rtReqHandlerA() and check its return value for one of
  1395.     the following values:
  1396.  
  1397.       CALL_HANDLER    - Check DoNotWait again, Wait() if you have to
  1398.                         and call rtReqHandlerA() again. In other words, loop.
  1399.       everything else - normal return value, requester has finished. This
  1400.                         return value will be the same as if the requester
  1401.                         had run normally.
  1402.  
  1403.     You must pass the signals you received to rtReqHandlerA().
  1404.  
  1405.     NOTE: if you want to wait for your own signals do not do so if
  1406.           DoNotWait is TRUE.  Call rtReqHandlerA() and if you must know
  1407.           if one of your signals arrived use SetSignal() to find this out.
  1408.           If you are waiting for a message to arrive at a message port you
  1409.           can simple call GetMsg() and check if it is non-null.
  1410.           DoNotWait will naturally only be TRUE when it absolutely,
  1411.           positively has to be.  A multitasking machine as the Amiga should
  1412.           use Wait() as much as possible.
  1413.  
  1414.     This is an example of a "requester loop":
  1415.  
  1416.     ...
  1417.     struct rtHandlerInfo *hinfo;
  1418.     ULONG ret, mymask, sigs;
  1419.  
  1420.     ...
  1421.        /* calculate our mask */
  1422.        mymask = 1 << win->UserPort->mp_SigBit;
  1423.  
  1424.        /* We use the RT_ReqHandler tag to cause the requester to return
  1425.           after initializing.
  1426.           Check the return value to see if this setup went ok. */
  1427.        if (rtFontRequest (req, "Font", RT_ReqHandler, &hinfo, TAG_END)
  1428.                                                            == CALL_HANDLER) {
  1429.           do {
  1430.             /* Wait() if we can */
  1431.             if (!hinfo->DoNotWait)
  1432.                sigs = Wait (hinfo->WaitMask | mymask);
  1433.  
  1434.             /* check our own message port */
  1435.             while (msg = GetMsg (win->UserPort)) {
  1436.                ...
  1437.                /* here we handle messages received at our windows IDCMP               ...
  1438.                   port */
  1439.                ...
  1440.                }
  1441.  
  1442.             /* let the requester do its thing (remember to pass 'sigs') */
  1443.             ret = rtReqHandler (hinfo, sigs, TAG_END);
  1444.  
  1445.             /* continue this loop as long as the requester is up */
  1446.             } while (ret == CALL_HANDLER)
  1447.  
  1448.           /* when we get here we know the requester has finished, 'ret'
  1449.              is the return code. */
  1450.           ...
  1451.           }
  1452.        else notify ("Error opening requester!");
  1453.     ...
  1454.  
  1455.   INPUTS
  1456.     handlerinfo - pointer to handler info structure initialized by using
  1457.                   the RT_ReqHandler tag when calling a requester function.
  1458.     sigs        - the signals received by previous wait, will be ignored if
  1459.                   hinfo->DoNotWait was TRUE.
  1460.     taglist     - pointer to a TagItem array.
  1461.  
  1462.   TAGS
  1463.     RTRH_EndRequest - supplying this tag will end the requester. The return
  1464.                       code from rtReqHandlerA() will _not_ be CALL_HANDLER,
  1465.                       but the requester return code.  If the tagdata of this
  1466.                       tag is REQ_CANCEL the requester will be canceled, if it
  1467.                       is REQ_OK the requester will be ok-ed.
  1468.                       In case of an EZRequest tagdata should be the return
  1469.                       code of the requester (TRUE, FALSE or 2,3,4,...).
  1470.  
  1471.   RESULT
  1472.     ret - CALL_HANDLER if you have to call rtReqHandlerA() again,
  1473.           or the normal return value from the requester.
  1474.  
  1475.   BUGS
  1476.     none known
  1477.  
  1478.   SEE ALSO
  1479.     rtEZRequest() (RT_ReqHandler explanation)
  1480.  
  1481. reqtools.library/rtScreenModeRequestA   reqtools.library/rtScreenModeRequestA
  1482.  
  1483.   NAME  rtScreenModeRequestA() [V38]
  1484.  
  1485.     ret = rtScreenModeRequestA (screenmodereq, title, taglist);
  1486.  
  1487.     BOOL rtScreenModeRequestA 
  1488.                   (struct rtScreenModeRequester *, char *, struct TagItem *);
  1489.     D0             A1                              A3      A0
  1490.  
  1491.     ret = rtScreenModeRequest (screenmodereq, title, tag1,...);
  1492.  
  1493.     BOOL rtScreenModeRequest
  1494.                            (struct rtScreenModeRequester *, char *, Tag,...);
  1495.  
  1496.   DESCRIPTION
  1497.  
  1498.     *IMPORTANT* THIS REQUESTER IS ONLY AVAILABLE FROM KICKSTART 2.0 ONWARDS!
  1499.                 The 1.3 version of ReqTools also contains the screenmode
  1500.                 requester, but unless you are running 2.0 or higher it will
  1501.                 not come up.  So what you essentially have to do is NOT
  1502.                 call rtScreenModeRequestA() if your program is running on
  1503.                 a machine with Kickstart 1.2/1.3.  You can safely call
  1504.                 rtScreenModeRequestA() if you are running on a 2.0 machine,
  1505.                 even if the user has installed the 1.3 version of ReqTools.
  1506.  
  1507.     Get a screen mode from the user.
  1508.  
  1509.     The user will be able to pick a screen mode by name, enter the size and
  1510.     the number of colors (bitplane depth).
  1511.  
  1512.     rtScreenModeRequestA() will call the appropriate 2.0 functions to get all
  1513.     the mode's information.  If no name has been assigned to the mode one
  1514.     will be constructed automatically.
  1515.  
  1516.   INPUTS
  1517.     screenmodereq - pointer to a struct rtScreenModeRequester allocated with
  1518.                     rtAllocRequestA().
  1519.     title         - pointer to requester window title (null terminated).
  1520.     taglist       - pointer to a TagItem array.
  1521.  
  1522.   TAGS
  1523.     RT_Window          - see rtEZRequestA()
  1524.     RT_ReqPos          - see rtEZRequestA()
  1525.     RT_LeftOffset      - see rtEZRequestA()
  1526.     RT_TopOffset       - see rtEZRequestA()
  1527.     RT_PubScrName      - see rtEZRequestA()
  1528.     RT_Screen          - see rtEZRequestA()
  1529.     RT_ReqHandler      - see rtEZRequestA()
  1530.     RT_WaitPointer     - see rtEZRequestA()
  1531.     RT_LockWindow      - see rtEZRequestA()
  1532.     RT_ScreenToFront   - see rtEZRequestA()
  1533.     RT_ShareIDCMP      - see rtEZRequestA()
  1534.     RT_Locale          - see rtEZRequestA()
  1535.     RT_IntuiMsgFunc    - (struct Hook *) [V38]
  1536.                          The requester will call this hook for each IDCMP
  1537.                          message it gets that doesn't belong to its window.
  1538.                          Only applies if you used the RT_ShareIDCMP tag to
  1539.                          share the IDCMP port with the parent window.
  1540.                          Parameters are as follows:
  1541.                            A0 - (struct Hook *) your hook
  1542.                            A2 - (struct rtScreenModeRequester *) your req
  1543.                            A1 - (struct IntuiMessage *) the message
  1544.                          After you have finished examining the message and
  1545.                          your hook returns, ReqTools will reply the message.
  1546.                          So do not reply the message yourself!
  1547.     RT_Underscore      - (char) [V38]
  1548.                          Indicates the symbol that precedes the character in
  1549.                          a gadget's label to be underscored.  This will also
  1550.                          define the keyboard shortcut for this gadget.
  1551.                          Currently only needed for RTSC_OkText.  Usually set
  1552.                          to '_'.
  1553.     RT_DefaultFont     - (struct TextFont *)
  1554.                          This tag allows you to specify the font to be used
  1555.                          in the requester when the screen font is
  1556.                          proportional.  Default is GfxBase->DefaultFont.
  1557.     RT_TextAttr        - [V38] see rtFileRequestA()
  1558.                          Remember: font cannot be proportional!
  1559.     RTSC_Flags         - (ULONG)
  1560.                          Several flags:
  1561.                            SCREQF_OVERSCANGAD   - Add an overscan cycle
  1562.                                                   gadget to the requester.
  1563.                                                   After the requester returns
  1564.                                                   you may read the overscan
  1565.                                                   type in 'rq->OverscanType'
  1566.                                                   If this is 0 no overscan is
  1567.                                                   selected (Regular Size), if
  1568.                                                   non-zero it holds one of
  1569.                                                   the OSCAN_... values
  1570.                                                   defined in the include file
  1571.                                                   'intuition/screens.[h|i]'.
  1572.                            SCREQF_AUTOSCROLLGAD - Add an autoscroll checkbox
  1573.                                                   gadget to the requester.
  1574.                                                   After the requester returns
  1575.                                                   read 'smreq->AutoScroll' to
  1576.                                                   see if the user prefers
  1577.                                                   autoscroll to be on or off.
  1578.                            SCREQF_SIZEGADS      - Add width and height
  1579.                                                   gadgets to the requester.
  1580.                                                   If you do not add these
  1581.                                                   gadgets the width and
  1582.                                                   height returned will be the
  1583.                                                   default width and height
  1584.                                                   for the selected overscan
  1585.                                                   type.
  1586.                            SCREQF_DEPTHGAD      - Add a depth slider gadget
  1587.                                                   to the requester.  If you
  1588.                                                   do not add a depth gadget,
  1589.                                                   the depth returned will be
  1590.                                                   the maximum depth this mode
  1591.                                                   can be opened in.
  1592.                            SCREQF_NONSTDMODES   - Include all modes. Unless
  1593.                                                   this flag is set
  1594.                                                   rtScreenModeRequestA()
  1595.                                                   will exclude nonstandard
  1596.                                                   modes.  Nonstandard modes
  1597.                                                   are presently HAM and EHB
  1598.                                                   (ExtraHalfBrite). So unless
  1599.                                                   you are picking a mode to
  1600.                                                   do some rendering in leave
  1601.                                                   this flag unset.  Without
  1602.                                                   this flag set the mode
  1603.                                                   returned will be a normal
  1604.                                                   bitplaned mode.
  1605.                            SCREQF_GUIMODES      - Set this flag if you are
  1606.                                                   getting a screen mode to
  1607.                                                   open a user interface
  1608.                                                   screen in.  The modes
  1609.                                                   shown will be standard
  1610.                                                   modes with a high enough
  1611.                                                   resolution (minumum 640
  1612.                                                   pixels).  If this flag is
  1613.                                                   set the SCREQF_NONSTDMODES
  1614.                                                   flag is ignored.
  1615.     RTSC_Height        - (ULONG)
  1616.                          Suggested height of screenmode requester window.
  1617.     RTSC_OkText        - (char *)
  1618.                          Replacement text for "Ok" gadget, max 6 chars long.
  1619.     RTSC_MinWidth      - (UWORD)
  1620.                          The minimum display width allowed.
  1621.     RTSC_MaxWidth      - (UWORD)
  1622.                          The maximum display width allowed.
  1623.     RTSC_MinHeight     - (UWORD)
  1624.                          The minimum display height allowed.
  1625.     RTSC_MaxHeight     - (UWORD)
  1626.                          The maximum display height allowed.
  1627.     RTSC_MinDepth      - (UWORD)
  1628.                          The minimum display depth allowed.  Modes with a
  1629.                          minimum display depth lower than this value will not
  1630.                          be included in the list.
  1631.     RTSC_MaxDepth      - (UWORD)
  1632.                          The maximum display depth allowed.
  1633.     RTSC_PropertyFlags - (ULONG)
  1634.                          A mode must have these property flags to be
  1635.                          included.  Only bits set in RTSC_PropertyMask are
  1636.                          considered.
  1637.     RTSC_PropertyMask  - (ULONG)
  1638.                          Mask to apply to RTSC_PropertyFlags to determine
  1639.                          which bits to consider.  See use of 'newsignals' and
  1640.                          'signalmask' in exec.library/SetSignal().  Default
  1641.                          is to consider all bits in RTSC_PropertyFlags as
  1642.                          significant.
  1643.     RTSC_FilterFunc    - (struct Hook *)
  1644.                          Call this hook for each display mode id in the
  1645.                          system's list.
  1646.                          Parameters are as follows:
  1647.                            A0 - (struct Hook *) your hook
  1648.                            A2 - (struct rtScreenModeRequester *) your req
  1649.                            A1 - (ULONG) 32-bit extended mode id
  1650.                          If your hook returns TRUE the mode will be accepted.
  1651.                          If it returns FALSE the mode will be skipped and
  1652.                          will not appear in the requester.
  1653.  
  1654.   RESULT
  1655.     ret - FALSE if the requester was canceled or TRUE if the user selected a
  1656.           screen mode (check 'smreq->DisplayID' for the 32-bit extended
  1657.           display mode, 'smreq->DisplayWidth' and 'smreq->DisplayHeight' for
  1658.           the display size, 'smreq->DisplayDepth' for the screen's depth) or
  1659.           FALSE if the requester was canceled.
  1660.  
  1661.   NOTE
  1662.     Automatically adjusts the requester to the screen font.
  1663.     If the screen font is proportional the default font will be used.
  1664.  
  1665.     If the requester got too big for the screen because of a very large font,
  1666.     the topaz.font will be used.
  1667.  
  1668.     rtScreenModeRequest() checks the pr_WindowPtr of your process to find the
  1669.     screen to put the requester on.
  1670.  
  1671.   BUGS
  1672.     none known
  1673.  
  1674.   SEE ALSO
  1675.     graphics/GetDisplayInfoData() graphics/displayinfo.h
  1676.     exec.library/SetSignal()
  1677.     Intuition/SA_DisplayID screen tag
  1678.  
  1679. reqtools.library/rtScreenToFrontSafely reqtools.library/rtScreenToFrontSafely
  1680.  
  1681.   NAME  rtScreenToFrontSafely()
  1682.  
  1683.     rtScreenToFrontSafely (screen); 
  1684.  
  1685.     void rtScreenToFrontSafely (struct Screen *);
  1686.                                 A0
  1687.  
  1688.   DESCRIPTION
  1689.     Brings the specified screen to the front of the display, but only after
  1690.     checking it is still in the list of currently open screens.
  1691.  
  1692.     This function can be used to bring a screen back to the front of the
  1693.     display after bringing another screen to the front.  If the first screen
  1694.     closed while you where busy it is harmless to call this function, unlike
  1695.     calling the normal ScreenToFront().
  1696.  
  1697.   INPUTS
  1698.     screen - pointer to the screen.
  1699.  
  1700.   RESULT
  1701.     none
  1702.  
  1703.   NOTE
  1704.     This function is for the advanced ReqTools user.
  1705.  
  1706.   BUGS
  1707.     none known
  1708.  
  1709.   SEE ALSO
  1710.     intuition.library/ScreenToFront()
  1711.  
  1712. reqtools.library/rtSetReqPosition           reqtools.library/rtSetReqPosition
  1713.  
  1714.   NAME  rtSetReqPosition()
  1715.  
  1716.     rtSetReqPosition (reqpos, newwindow, screen, window);
  1717.  
  1718.     void rtSetReqPosition
  1719.                (ULONG, struct NewWindow *, struct Screen *, struct Window *);
  1720.                 D0     A0                  A1               A2
  1721.  
  1722.   DESCRIPTION
  1723.     Sets newwindow->LeftEdge and newwindow->TopEdge according to reqpos.
  1724.  
  1725.     Except for the left- and topedge 'newwindow' must already be completely
  1726.     initialized.
  1727.  
  1728.     The newwindow->LeftEdge and newwindow->TopEdge already in the NewWindow
  1729.     structure will be used as offsets to the requested position.  If you'd
  1730.     like a window at position (25,18) from the top left of the screen you
  1731.     would fill newwindow->LeftEdge with 25, newwindow->TopEdge with 18 and
  1732.     call rtSetReqPosition() with reqpos equal to REQPOS_TOPLEFTSCR.
  1733.  
  1734.     Don't forget to make sure newwindow->LeftEdge and newwindow->TopEdge
  1735.     are 0 if you don't want to offset your window.
  1736.  
  1737.     In case of REQPOS_POINTER you can use them to point to your window's
  1738.     hotspot, where the pointer should point.  If you call rtSetReqPosition()
  1739.     with the left- and topedge equal to 0 you'd get a window appearing with
  1740.     its top- and leftedge equal to the current pointer position.
  1741.  
  1742.     Note that the screen pointer may _NOT_ be NULL.  If you have your own
  1743.     window open you can supply yourwindow->WScreen to this function.
  1744.  
  1745.     The window pointer is only required if reqpos is REQPOS_CENTERWIN or
  1746.     REQPOS_TOPLEFTWIN.  Even in this case you may call rtSetReqPosition()
  1747.     with a NULL window pointer.  The positions will simply fall back to
  1748.     REQPOS_CENTERSCR and REQPOS_TOPLEFTSCR respectively.
  1749.  
  1750.   INPUTS
  1751.     reqpos    - one of the REQPOS_... constants usable with RT_ReqPos.
  1752.     newwindow - pointer to your (already initialized) NewWindow structure.
  1753.     screen    - pointer to screen the requester will appear on.
  1754.     window    - pointer to parent window or NULL.
  1755.  
  1756.   RESULT
  1757.     none
  1758.  
  1759.   NOTE
  1760.     This function is for the advanced ReqTools user.
  1761.  
  1762.   BUGS
  1763.     none known
  1764.  
  1765.   SEE ALSO
  1766.     RT_ReqPos tag
  1767.  
  1768. reqtools.library/rtSetWaitPointer           reqtools.library/rtSetWaitPointer
  1769.  
  1770.   NAME  rtSetWaitPointer()
  1771.  
  1772.     rtSetWaitPointer (window);
  1773.  
  1774.     void rtSetWaitPointer (struct Window *);
  1775.                            A0
  1776.  
  1777.   DESCRIPTION
  1778.     Change the window's pointer image to that of a wait pointer.  Call this
  1779.     function whenever your program will be busy doing something for a lengthy
  1780.     period of time.
  1781.  
  1782.     It is recommended you call this function before calling any of the
  1783.     requester functions.  This way if the user clicks in your window he will
  1784.     know he must respond to the requester before doing anything else.  Also
  1785.     see the RT_WaitPointer tag for an automatic way of setting the wait
  1786.     pointer.  If you are using ReqTools V38+ check out the RT_LockWindow tag!
  1787.  
  1788.   INPUTS
  1789.     window - pointer to the window to receive the wait pointer.
  1790.  
  1791.   RESULT
  1792.     none
  1793.  
  1794.   NOTE
  1795.     The wait pointer will look exactly like the standard Workbench 2.0
  1796.     wait pointer.  In combination with PointerX, ClockTick or LacePointer
  1797.     the handle will turn.
  1798.  
  1799.   BUGS
  1800.     none known
  1801.  
  1802.   SEE ALSO
  1803.  
  1804. reqtools.library/rtSpread                           reqtools.library/rtSpread
  1805.  
  1806.   NAME  rtSpread()
  1807.  
  1808.     rtSpread (posarray, sizearray, totalsize, min, max, num);
  1809.  
  1810.     void rtSpread (ULONG *, ULONG *, ULONG, ULONG, ULONG, ULONG);
  1811.                    A0       A1       D0     D1     D2     D3
  1812.  
  1813.   DESCRIPTION
  1814.     Evenly spread a number of objects over a certain length.
  1815.     Primary use is for arrangement of gadgets in a window.
  1816.  
  1817.     Example:
  1818.  
  1819.     'sizearray' holds following values: 4, 6, 4, 2 and 8,
  1820.     'totalsize' is 24 (= 4 + 6 + 4 + 2 + 8),
  1821.     'min' is 3, 'max' is 43,
  1822.     and finally, 'num' is 5.
  1823.  
  1824.     After calling rtSpread() 'posarray' would hold the following
  1825.     values: 3, 11, 19, 26 and 31.
  1826.  
  1827.     My attempt at a visual representation:
  1828.  
  1829.         |                                            |
  1830.         |  |                                      |  |
  1831.         |  OOOO    OOOOOO    OOOO    OO    OOOOOOOO  |
  1832.         |  |                                      |  |
  1833.         |         1    1    2    2    3    3    4    4
  1834.         0----5----0----5----0----5----0----5----0----5
  1835.  
  1836.   INPUTS
  1837.     posarray  - pointer to array to be filled with positions.
  1838.     sizearray - pointer to array of sizes.
  1839.     totalsize - total size of all objects (sum of all values in sizearray).
  1840.     min       - first position to use.
  1841.     max       - last position, first _NOT_ to use.
  1842.     num       - number of objects (size of posarray and sizearray).
  1843.  
  1844.   RESULT
  1845.     none
  1846.  
  1847.   NOTE
  1848.     This function is for the advanced ReqTools user.
  1849.  
  1850.   BUGS
  1851.     none known
  1852.  
  1853.   SEE ALSO
  1854.  
  1855. reqtools.library/rtUnlockWindow               reqtools.library/rtUnlockWindow
  1856.  
  1857.   NAME  rtUnlockWindow() [V38]
  1858.  
  1859.     rtUnlockWindow (window, windowlock);
  1860.  
  1861.     void rtUnlockWindow (struct Window *, APTR);
  1862.                          A0               A1
  1863.  
  1864.   DESCRIPTION
  1865.     Unlock a window previously locked with rtLockWindow().  The window will
  1866.     once again accept user input and will get its original mouse pointer
  1867.     back (default or custom).
  1868.  
  1869.     Under Kickstart V39 the original window pointer will not be restored if
  1870.     it was set using SetWindowPointer().  You will have to restore the
  1871.     pointer yourself in this case.
  1872.  
  1873.   INPUTS
  1874.     window     - pointer to the window to be unlocked.
  1875.     windowlock - the windowlock pointer returned by rtLockWindow(), may
  1876.                  be NULL.
  1877.  
  1878.   RESULT
  1879.     none
  1880.  
  1881.   BUGS
  1882.     none known
  1883.  
  1884.   SEE ALSO
  1885.  
  1886.